<?php echo $header; ?>
<div id="content">
  <div class="breadcrumb">
    <?php foreach ($breadcrumbs as $breadcrumb) { ?>
    <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
    <?php } ?>
  </div>
  <?php if ($error_warning) { ?>
  <div class="warning"><?php echo $error_warning; ?></div>
  <?php } ?>
  <div class="box">
    <div class="heading">
      <h1><img src="view/image/order.png" alt="" /> <?php echo $heading_title; ?></h1>
      <div class="buttons"><a onclick="$('#form').submit();" class="button"><?php echo $button_save; ?></a><a onclick="location = '<?php echo $cancel; ?>';" class="button"><?php echo $button_cancel; ?></a></div>
    </div>
    <div class="content">
      <form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="form">
        <?php if (isset($id)) { ?>
        <input type="hidden" name="id" value="<?php echo $id; ?>"/>
        <?php } ?>
        <table class="form">
          <tr>
            <td><?php echo $entry_category; ?></td>
            <td>
            	<select name="category_id">
                  <option value="0">--</option>
                  <?php foreach ($categories as $category) { ?>
                  <?php if ($category['category_id'] == $category_id) { ?>
                  <option value="<?php echo $category['category_id']; ?>" title="<?php echo $category['name']; ?>" selected="selected"><?php echo $category['display_name']; ?></option>
                  <?php } else { ?>
                  <option value="<?php echo $category['category_id']; ?>" title="<?php echo $category['name']; ?>"><?php echo $category['display_name']; ?></option>
                  <?php } ?>
                  <?php } ?>
                </select>
            </td>
          </tr>
          <tr>
            <td><?php echo $entry_language; ?></td>
            <td>
            	<select name="language_id">
                  <?php foreach ($languages as $language) { ?>
                  <?php if ($language['language_id'] == $language_id) { ?>
                  <option value="<?php echo $language['language_id']; ?>" title="<?php echo $language['code']; ?>" selected="selected"><?php echo $language['name']; ?></option>
                  <?php } else { ?>
                  <option value="<?php echo $language['language_id']; ?>" title="<?php echo $language['code']; ?>"><?php echo $language['name']; ?></option>
                  <?php } ?>
                  <?php } ?>
                </select>
            </td>
          </tr>
          <tr>
            <td><?php echo $entry_keyword; ?></td>
            <td><input type="text" name="keyword" value="<?php echo $keyword; ?>"/></td>
          </tr>
          <tr>
            <td><?php echo $entry_click_num; ?></td>
            <td><input type="text" name="click_num" value="<?php echo $click_num; ?>"/></td>
          </tr>
          <tr>
            <td><?php echo $entry_show_home; ?></td>
            <td>
            	<input type="radio" name="show_home" value="0" <?php if ($show_home == 0){ echo 'checked="checked"';} ?> /><?php echo $text_no; ?>
                <input type="radio" name="show_home" value="1" <?php if ($show_home == 1){ echo 'checked="checked"';} ?> /><?php echo $text_yes; ?>
            </td>
          </tr>
          <tr>
            <td><?php echo $entry_status; ?></td>
            <td>
            	<input type="radio" name="status" value="0" <?php if ($status == 0){ echo 'checked="checked"';} ?> /><?php echo $text_status_no; ?>
                <input type="radio" name="status" value="1" <?php if ($status == 1){ echo 'checked="checked"';} ?> /><?php echo $text_status_yes; ?>
            </td>
          </tr>
        </table>
      </form>
    </div>
  </div>
</div>
<?php echo $footer; ?>